<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
	<style type="text/css">
			#rows{
				margin-top:20px;
				font-size: 16px;
				margin-left: 10px;
			}
		</style>
<script type="text/javascript">
 function doEdit(){
	var storeid="${object.storeid}";
	var qstate=$("#qstate").val();
		Kit.confirm("提示","确定修改分公司状态吗？",function(ref){
			$.post("${BASE_PATH}/dict/store/tong/edit",{storeid:storeid,qstate:qstate},function(result){
				if(result.flag==0){
					Kit.alert("操作成功");
					onEditSuccess(result.object);
					editDialog.close();
				}else{
					Kit.alert("操作失败");return;
				}
				
			});
		});
 	}
   $(document).ready(function() {
     $(".radioItem").change(function() {
         var $selectedvalue = $("input[name='state']:checked").val();
         if ($selectedvalue == 1) {
        	 $("input[name=qstate]").val(1);
         }else if($selectedvalue == 2){
        	 $("input[name=qstate]").val(2);
         }else{
        	 $("input[name=qstate]").val(3);
         }
     });
 });  
</script>
 <div >
 	<div class="row" id="rows" style="text-align: center;">
	    <label style="font-size:20px;">分公司权限修改</label>
	</div>
	<div class="row" id="rows">
	    <label class="text-label" >分公司名称：</label>
	    <div class="text-content" >${object.title}</div>
	 </div>
	<div class="row" id="rows">   
	    <label class="text-label" >分公司联系人：</label>
	    <div class="text-content" >${object.aname}</div>
	 </div>
	<div class="row" id="rows">  
	    <label class="text-label" >分公司电话：</label>
	    <div class="text-content" >${object.aphone}</div>
	</div>
	<div class="row" id="rows" style="display:none">
	    <label class="text-label">分公司状态：</label>
	    <input hidden="hidden" type="text" id="qstate" name="qstate" value="${object.qstate}"/>
	 	<div class="text-content">
		 	正常 :&nbsp;&nbsp;<input type="radio" disabled class="radioItem" id="state1" name="state" value="1" <c:if test="${object.qstate ==1 }">checked="checked"</c:if>/>
		 	<%-- &nbsp;&nbsp;禁货 :&nbsp;&nbsp;<input type="radio" class="radioItem" id="state2" name="state" value="2" <c:if test="${object.qstate ==2 }">checked="checked"</c:if>/> --%>
		<%--     &nbsp;&nbsp;降权 :&nbsp;&nbsp;<input type="radio" class="radioItem" id="state3" name="state" value="3" <c:if test="${object.qstate ==3 }">checked="checked"</c:if>/> --%>
	    </div>
	</div>
	<div class="row" id="rows">
		<div class="col-lg-6"><button class="btn btn-primary col-sm-3 pull-right" type="submit" onclick="doEdit();">提交</button></div>
		<div class="col-lg-6"><button class="btn btn-default col-sm-3 pull-left"  type="button" onclick="javascript:editDialog.close();" autocomplete="off">取消</button></div>
	</div>
</div>